<template>
  <div class="polygon_tab polygon_tab_warn">
    <div class="p_tab_title">点位离线告警</div>
    <div class="polygon_tab_content">
      <div class="tab_row">
        <div class="row_l_box">
          <div class="row_l_box_icon"></div>
          <Ring rate="0.9" size="37" stroke-width="3" stroke-color="#a5cade" text="100" text-size="20" />
        </div>
        <div class="row_r_box">
          <div class="row_r_l">未上线数量</div>
          <div class="row_r_r">******点位</div>
        </div>
      </div>

      <div class="tab_row">
        <div class="row_l_box">
          <div class="row_l_box_icon"></div>
          <Ring rate="0.9" size="37" stroke-width="3" stroke-color="#a5cade" text="100" text-size="20" />
        </div>
        <div class="row_r_box">
          <div class="row_r_l">未上线数量</div>
          <div class="row_r_r">******点位</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Ring from './Ring'
export default {
  name: 'PolygonTabWarn',
  components: {
    [Ring.name]: Ring
  },
  data() {
    return {}
  },
  methods: {}
}
</script>

<style lang="scss">
@keyframes warn_fadeIn {
  from {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
  to {
    opacity: 0.5;
  }
}
.polygon_tab_warn {
  top: 462px;
  right: 10px;
  width: 487px;
  height: 340px;
  background-image: url('../../assets/img/polygon_4.png');
  background-size: contain;
  color: #00e4ff;

  &:hover {
    filter: drop-shadow(0 0 20px rgba(14, 166, 229, 0.5));
    transform: translate3d(-10px, -10px, 20px) scale(1.01);
    perspective: 500px;
  }

  .polygon_tab_content {
    display: flex;
    flex-flow: column;
    justify-content: space-around;
  }

  .tab_row {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .row_l_box {
    position: relative;
    width: 78px;
    height: 78px;

    .row_l_box_icon {
      position: absolute;
      left: -18px;
      top: -30px;
      width: 79px;
      height: 55px;
      background-size: contain;
      background-repeat: no-repeat;
      background-image: url('../../assets/img/warn_line_left.png');

      animation-name: warn_fadeIn;
      animation-duration: 2s;
      animation-iteration-count: infinite;
      animation-fill-mode: backwards;
    }
  }

  .row_r_box {
    position: relative;
    height: 60px;
    // flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-right: 178px;
    margin-left: 15px;
    user-select: none;
  }

  .row_r_l {
    height: 100%;
    width: 120px;
    padding: 0 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-image: url('../../assets/img/warn_line_mid.png');
    text-align: center;
    line-height: 60px;
    font-size: 14px;
    color: #fff;

    @include text-ellipsis();
  }

  .row_r_r {
    position: absolute;
    right: 0;
    top: 0;
    z-index: 1;
    height: 100%;
    width: 190px;
    padding: 0 20px;
    background-size: 110% 120%;
    background-position: center center;
    background-repeat: no-repeat;
    background-image: url('../../assets/img/warn_line_right.png');
    text-align: center;
    line-height: 60px;
    font-size: 14px;
    color: #fff;

    @include text-ellipsis();
  }
}
</style>
